function handles = calcCellParameters(handles)
% calcCellParameters
%
% Editing:
% gs april 2005
% ----------------------------------------------------------------


handles.data.map.mapAvg.rseries = [];
handles.data.map.mapAvg.rmembrane = [];
handles.data.map.mapAvg.cmembrane = [];

if ~handles.data.analysis.currentClamp

    handles.data.analysis.skipCm = 0; % option here to skip Cm calc, e.g. if it's too slow

    for m = 1 : handles.data.analysis.numberOfMaps

        string = (['handles.data.map.map' num2str(m)]);
        eval(['handles.data.map.mapActive = ' string ';']);

        dataArray = handles.data.map.mapActive.bsArray;
        handles = arrayCellParams(handles, dataArray);

    end
else
    disp('Cell parameter calculations not yet implemented for current clamp.');
end

handles = avgCellParameters(handles);